package com.logicalthinking.socialmall.dao;

import com.logicalthinking.socialmall.entity.RoleAuth;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Set;

/**
 * 角色权限关联
 * @author chenLiJia
 * @since 2020-02-17 14:43:32
 * @version 1.0
 **/
public interface RoleAuthMapper extends Mapper<RoleAuth> {
    RoleAuth selectByPrimaryKey(Integer id);


    /**
     * 批量添加角色权限关联
     * @param roleAuthList
     * @return
     */
    Integer batchAdd(@Param("roleAuthList") List<RoleAuth> roleAuthList);


    /**
     * 根据角色id集合查询角色权限
     * @param roleIdSet
     * @return
     */
    List<RoleAuth> listByRoleIdSet(@Param("roleIdSet") Set<Integer> roleIdSet);

}